<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="utf8"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Users</title>
</head>
<body>
	<a href="<c:url value="?lang=en"/>">en</a>
	<a href="<c:url value="?lang=ru"/> ">ru</a>
	<br>
	<a href="<c:url value="logout.htm"/> "><spring:message
			code="label.logout" /> </a>
	<br>
	<a href="<c:url value="data.htm"/> "><spring:message
			code="label.dataManager" /> </a>
	<h2>INDEX.JSP</h2>

	<br>
	<a href="<c:url value="chuse_default_rules.htm"/> "><spring:message
			code="game.chuseDefaultRules" /> </a>
	<br>
	<a href="<c:url value="autolayout.htm"/> "><spring:message
			code="game.outolayout" /> </a>
	<br>
	<a href="<c:url value="random_play.htm"/> "><spring:message
			code="game.toPlay" /> </a>

	<table id=battleField border="1">
		<tr>
			<td>
				<table id="myField">
					<c:forEach var="row" items="${admiral.myMap.seaMap}" begin="0" step="1"
						varStatus="y">
						<tr>
							<c:forEach var="cell" items="${row}" varStatus="x">
								<td><a title="(x=${x.count}; y=${y.count})"
									href=<c:url value="index.htm"/>> 
										<img src="img/${cell.image}" alt="${cell.image}???" /> </a>
								</td>
							</c:forEach>
						</tr>
					</c:forEach>
				</table>
			</td>
			
			<td>
			<c:if test="${admiral.gameInProgress}">
				<table id="myField">
					<c:forEach var="row" items="${admiral.enemysMap.seaMap}" begin="0" step="1"
						varStatus="y">
						<tr>
							<c:forEach var="cell" items="${row}" varStatus="x">
								<td><a title="Shoot (x=${x.count}; y=${y.count})"
									href=<c:url value="shoot.htm?x=${x.count}&y=${y.count}"/>>
										<img src="img/${cell.image}" alt="${cell.image}???" /> </a>
								</td>
							</c:forEach>
						</tr>
					</c:forEach>
				</table>
			
			</c:if>
			</td>
		</tr>
	</table>


</body>
</html>
